package com.tz.web;
import com.tz.service.shoporder.IShoporderService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;

/**
 * Created by hfl on 2016-11-11.
 */
@Controller
@RequestMapping("/admin")
public class IndexController {

    @Resource
    private IShoporderService shoporderService;

    @RequestMapping("/index")
    public String index(Model model){
        model.addAttribute("refurbishNum",shoporderService.getDayOrderNum("001"));
        model.addAttribute("repairNum",shoporderService.getDayOrderNum("002"));
        model.addAttribute("testingNum",shoporderService.getDayOrderNum("003"));
        model.addAttribute("recoveryNum",shoporderService.getDayOrderNum("004"));
        model.addAttribute("exchangeNum",shoporderService.getDayOrderNum("005"));
        model.addAttribute("shopNum",shoporderService.getDayOrderNum("006"));
        model.addAttribute("orderNum",shoporderService.getDayAllOrderNum());
        model.addAttribute("userNum",shoporderService.getDayUserNum());
        return "index";
    }

    @RequestMapping("/refuse")
    public String refuse(){
        return "refuse";
    }


}
